package org.gy.demo;

public class main {
    public static void main(String[] args) {
        int sum = calculateSum(1, 100);
        System.out.println("1 到 100 的和为：" + sum);
    }

    public static int calculateSum(int start, int end) {
        int sum = 0;
        for (int i = start; i <= end; i++) {
            sum += i;
        }
        return sum;
    }
}
